require('bootstrap-loader')
require('styles/skin')
require('styles/app')

//js
require('libs/app')

import React from 'react'
import ReactDOM from 'react-dom'
import {Provider} from 'react-redux'

import Dashboard from './components/dashboard/Dashboard'
import Banner from './components/banner/Banner'
import Price from './components/price/Price'

import { Router, Route, IndexRoute, useRouterHistory } from 'react-router'
import configureStore from './stores/store'

import { createHashHistory } from 'history'
// useRouterHistory creates a composable higher-order function
const appHistory = useRouterHistory(createHashHistory)({ queryKey: false })

//关联reducers, store, actions
const store = configureStore()

ReactDOM.render(
  <Provider store={store}>
    <Router history={appHistory}>
      <Route path="/" component={Dashboard}/>
      <Route path="/dashboard" component={Dashboard}/>
      <Route path="/banner" component={Banner}/>
      <Route path="/price" component={Price}/>
    </Router>
  </Provider>,
  document.getElementById('app')
);
